package myschool.array.student;

import java.util.Scanner;

public class Array {
    /**
     * 数组
     * int[] i;声明数组
     * i = new int[5];分配空间5个数组
     * i[0] = 8;赋值，第一个数组为8
     * i[0] = i[0]*10;处理数据
     * @param args
     */
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int[] scoreOne={99,88,77};
        int[] score = new int[] {89,79,76,90,64};
        //边声明边赋值
        int[] scoreTow;
        scoreTow = new int[30];
        for (int i = 0; i < 30; i++) {
            scoreTow[i] = input.nextInt();
        }
        //动态的输入信息并赋值
        int sum = 0;
        double avg;
        for (int i = 0; i < score.length;i++) {
            sum = sum+score[i];
        }
        avg = sum/score.length;
        //求数组平均数，length为数组长度
    }
}
